package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ActivitiesMapper;
import com.ruoyi.system.domain.Activities;
import com.ruoyi.system.service.IActivitiesService;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-29
 */
@Service
public class ActivitiesServiceImpl implements IActivitiesService 
{
    @Autowired
    private ActivitiesMapper activitiesMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public Activities selectActivitiesById(Long id)
    {
        return activitiesMapper.selectActivitiesById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param activities 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<Activities> selectActivitiesList(Activities activities)
    {
        return activitiesMapper.selectActivitiesList(activities);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param activities 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertActivities(Activities activities)
    {
        activities.setCreateTime(DateUtils.getNowDate());
        return activitiesMapper.insertActivities(activities);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param activities 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateActivities(Activities activities)
    {
        activities.setUpdateTime(DateUtils.getNowDate());
        return activitiesMapper.updateActivities(activities);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteActivitiesByIds(Long[] ids)
    {
        return activitiesMapper.deleteActivitiesByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteActivitiesById(Long id)
    {
        return activitiesMapper.deleteActivitiesById(id);
    }
}
